﻿/* v0.0.1 2016-09-20 by howard */
/**
* 获取浏览器信息env.browser
*/
/**
*howardSelfBrowserParam的结果集列表
*isWebview:true
*name:"iOS Webview"
*version:"9.1"
**/
;(function(paramWindow,howardSelfBrowserParam) {
	howardSelfBrowserParam.env = howardSelfBrowserParam.env || {};
    var _paramBrowserVersion, _paramUserAgent = paramWindow.navigator.userAgent; (_paramBrowserVersion = _paramUserAgent.match(/(?:UCWEB|UCBrowser\/)([\_paramUserAgent\.]+)/)) ? howardSelfBrowserParam.env.browser = {
        name: "UC",
        isUC: !0,
        version: _paramBrowserVersion[1]
    }: (_paramBrowserVersion = _paramUserAgent.match(/MQQBrowser\/([\_paramUserAgent\.]+)/)) ? howardSelfBrowserParam.env.browser = {
        name: "QQ",
        isQQ: !0,
        version: _paramBrowserVersion[1]
    }: (_paramBrowserVersion = _paramUserAgent.match(/(?:Firefox|FxiOS)\/([\_paramUserAgent\.]+)/)) ? howardSelfBrowserParam.env.browser = {
        name: "Firefox",
        isFirefox: !0,
        version: _paramBrowserVersion[1]
    }: (_paramBrowserVersion = _paramUserAgent.match(/MSIE\s([\_paramUserAgent\.]+)/)) || (_paramBrowserVersion = _paramUserAgent.match(/IEMobile\/([\_paramUserAgent\.]+)/)) ? (howardSelfBrowserParam.env.browser = {
        version: _paramBrowserVersion[1]
    },
    _paramUserAgent.match(/IEMobile/) ? (howardSelfBrowserParam.env.browser.name = "IEMobile", howardSelfBrowserParam.env.browser.isIEMobile = !0) : (howardSelfBrowserParam.env.browser.name = "IE", howardSelfBrowserParam.env.browser.isIE = !0), _paramUserAgent.match(/Android|iPhone/) && (howardSelfBrowserParam.env.browser.isIELikeWebkit = !0)) : (_paramBrowserVersion = _paramUserAgent.match(/(?:Chrome|CriOS)\/([\_paramUserAgent\.]+)/)) ? (howardSelfBrowserParam.env.browser = {
        name: "Chrome",
        isChrome: !0,
        version: _paramBrowserVersion[1]
    },
    _paramUserAgent.match(/Version\/[\_paramUserAgent+\.]+\s*Chrome/) && (howardSelfBrowserParam.env.browser.name = "Chrome Webview", howardSelfBrowserParam.env.browser.isWebview = !0)) : _paramUserAgent.match(/Safari/) && (_paramBrowserVersion = _paramUserAgent.match(/Android[\s\/]([\_paramUserAgent\.]+)/)) ? howardSelfBrowserParam.env.browser = {
        name: "Android",
        isAndroid: !0,
        version: _paramBrowserVersion[1]
    }: _paramUserAgent.match(/iPhone|iPad|iPod/) && (_paramUserAgent.match(/Safari/) && (_paramBrowserVersion = _paramUserAgent.match(/Version\/([\_paramUserAgent\.]+)/)) ? howardSelfBrowserParam.env.browser = {
        name: "Safari",
        isSafari: !0,
        version: _paramBrowserVersion[1]
    }: (_paramBrowserVersion = _paramUserAgent.match(/OS ([\d_\.]+) like Mac OS X/)) && (howardSelfBrowserParam.env.browser = {
        name: "iOS Webview",
        isWebview: !0,
        version: _paramBrowserVersion[1].replace(/\_/g, ".")
    })),
    howardSelfBrowserParam.env.browser || (howardSelfBrowserParam.env.browser = {
        name: "unknown",
        version: "0.0.0"
    }),
    howardSelfBrowserParam.version && (howardSelfBrowserParam.env.browser.version = howardSelfBrowserParam.version(howardSelfBrowserParam.env.browser.version))
    console.log(howardSelfBrowserParam);
})(window, window.howardSelfBrowserParam || (window.howardSelfBrowserParam = {}));